{% load comments %}
{% load comparison %}
{% get_comment_count for object as comment_count %}
<div class="post">
    <div class="header">
        <h2><a class="title" href="{{ object.get_absolute_url }}">{{ object.title }}</a></h2>
        <p class="date_published"> 
			{{ object.date_published|date:"l, F jS, Y @ g:i A" }} \\
			{% if object.author.get_profile %}
       	 		<a href="{{ object.author.get_profile.get_absolute_url }}">{{ object.author.get_full_name }}</a>
			{% else %}
				{{ object.author.get_full_name }}
			{% endif %}


<!--微博转播按钮><-->
<img src="http://v.t.qq.com/share/images/s/weiboicon24.png" align="absmiddle" border="0" alt="转播到腾讯微博" /> <a href="javascript:void(0)" onclick="postToWb();return false;" style="height:24px;font-size:14px;line-height:24px;"> 转播到腾讯微博</a><script type="text/javascript">
	function postToWb(){
		var _t = encodeURI(document.title);
		var _url = encodeURIComponent(document.location);
		var _appkey = encodeURI("appkey");//你从腾讯获得的appkey
		var _pic = encodeURI('');//（例如：var _pic='图片url1|图片url2|图片url3....）
		var _site = '';//你的网站地址
		var _u = 'http://v.t.qq.com/share/share.php?url='+_url+'&appkey='+_appkey+'&site='+_site+'&pic='+_pic+'&title='+_t;
		window.open( _u,'', 'width=700, height=680, top=0, left=0, toolbar=no, menubar=no, scrollbars=no, location=yes, resizable=no, status=no' );
	}
</script>


<!--qq空间转播按钮><-->
<a href="javascript:void(0);" onclick="window.open('http://sns.qzone.qq.com/cgi-bin/qzshare/cgi_qzshare_onekey?url='+encodeURIComponent(document.location.href));return false;" title="分享到QQ空间"><img src="http://qzonestyle.gtimg.cn/ac/qzone_v5/app/app_share/qz_logo.png" alt="分享到QQ空间" /></a>
<!--腾讯朋友转播按钮><-->
<a href="javascript:void(0);" onclick="window.open('http://sns.qzone.qq.com/cgi-bin/qzshare/cgi_qzshare_onekey?to=pengyou&url='+encodeURIComponent(document.location.href));return false;" title="分享到腾讯朋友"><img src="http://qzonestyle.gtimg.cn/ac/qzone_v5/app/qzshare/xy-icon.png" alt="分享到腾讯朋友" /></a>
<!--新浪微博转播按钮><-->
<script type="text/javascript" charset="UTF-8">
(function(){
  var _w = 72 , _h = 16;
  var param = {
    url:location.href,
    type:'3',
    count:'1', /**是否显示分享数，1显示(可选)*/
    appkey:'', /**您申请的应用appkey,显示分享来源(可选)*/
    title:'{{ object.title }}', /**分享的文字内容(可选，默认为所在页面的title)*/
    pic:'', /**分享图片的路径(可选)*/
    ralateUid:'', /**关联用户的UID，分享微博会@该用户(可选)*/
    rnd:new Date().valueOf()
  }
  var temp = [];
  for( var p in param ){
    temp.push(p + '=' + encodeURIComponent( param[p] || '' ) )
  }
  document.write('<iframe allowTransparency="true" frameborder="0" scrolling="no" src="http://hits.sinajs.cn/A1/weiboshare.html?' + temp.join('&') + '" width="'+ _w+'" height="'+_h+'"></iframe>')
})()
</script>


		</p>
        <p class="comment_count"><a href="{{ object.get_absolute_url }}#comments_list">评论（{{ comment_count }}）次，点击查看评论</a></p>
    </div>
    <div class="post_body">
        {% if post_display %}
            {{ object.content|safe }}
        {% else %}
            {% with object.content|wordcount as size %}
                {% if_greater size 100 %}
                    {{ object.contenty|safe|truncatewords_html:100 }}
                    <a href="{{ object.get_absolute_url }}"> Continue Reading... </a>
                {% else %}
                    {{ object.content|safe }}
                    <a href="{{ object.get_absolute_url }}"> Read Comments({{ comment_count }})</a>
                {% endif_greater %}
            {% endwith %}
        {% endif %}
    </div>
    <div class="post_tags">
           标签：
        {% for tag in object.tag.all %}
            <a href="{{ tag.get_absolute_url }}">{{ tag.name }}</a>
        {% endfor %}
    </div>
</div>
